class Animal:
    def eat(self):
        print("吃")

    def drink(self):
        print("喝")

    def run(self):
        print("跑")

    def sleep(self):
        print("睡")


class Dog(Animal):
    def bark(self):
        print("汪汪叫")


class XiaoTianQuan(Dog):
    def fly(self):
        print("我会飞")

    # 父类的方法不能满足子类的需求，可以在子类中重新编写
    def bark(self):
        print("哇哇叫")


class Cat(Animal):
    def catch(self):
        print("抓老鼠")


dog = Dog()
dog.bark()
dog.eat()

xtq = XiaoTianQuan()
xtq.fly()
xtq.eat()
xtq.bark()

cat = Cat()
cat.eat()
cat.catch()